unit URelTurmas;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, StdCtrls, ExtCtrls;

type
  TfrmRelTurmas = class(TForm)
    Panel1: TPanel;
    Label36: TLabel;
    Button2: TButton;
    Edit19: TEdit;
    Panel2: TPanel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn4: TBitBtn;
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure BitBtn4Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmRelTurmas: TfrmRelTurmas;

implementation

uses UListaProf, UListaModa;

{$R *.dfm}

procedure TfrmRelTurmas.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  frmRelTurmas.Release;
  frmRelTurmas := nil;
end;

procedure TfrmRelTurmas.BitBtn4Click(Sender: TObject);
begin
  Close;
end;

procedure TfrmRelTurmas.Button2Click(Sender: TObject);
begin
try
 if frmListaProf = Nil then
  begin
   frmListaProf := TfrmListaProf.Create(self);
   frmListaProf.Show;
  end
  else
  begin
   frmListaProf.Show;
   frmListaProf.WindowState:= wsMaximized;
  end; // Begin
except
  ShowMessage('Erro ao tentar exibir a tela de listas de professores!');
end; // TRY
end;

procedure TfrmRelTurmas.Button1Click(Sender: TObject);
begin
try
 if frmListaMod = Nil then
  begin
   frmListaMod := TfrmListaMod.Create(self);
   frmListaMod.Show;
  end
  else
  begin
   frmListaMod.Show;
   frmListaMod.WindowState:= wsMaximized;
  end; // Begin
except
  ShowMessage('Erro ao tentar exibir a tela de listas de modalidades!');
end; // TRY
end;

end.
